using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using FriendsNearby.Services.Entities;
using InSTEDD.Labs.Geo;
using FriendsNearby.Services.Facebook;
using Facebook.Service;

namespace FriendsNearby.Services.Tests
{
    [TestFixture]
    public class NewFriendNearbyStrategyFixture
    {
        [Test]
        public void NewFriendDetected()
        {
            List<PersonNearby> before = new List<PersonNearby>();
            List<PersonNearby> now = new List<PersonNearby>();

			Guid a = Guid.NewGuid();
			Guid b = Guid.NewGuid();
			Guid c = Guid.NewGuid();

            before.Add(new PersonNearby(){UserID = a});
            before.Add(new PersonNearby() { UserID = b });

            now.Add(new PersonNearby() { UserID = a });
            now.Add(new PersonNearby() { UserID = c , DisplayName="C name" });


            IEnumerable<string> newNearbies = NewFriendNearbyStrategy.GetNewFriendsNearby(before, now);

            Assert.IsNotNull(newNearbies);

            var it = newNearbies.GetEnumerator();

            Assert.IsTrue(it.MoveNext());
            Assert.AreEqual("C name", it.Current);
        }
    }

}
